/*
 * Servo.h
 *
 *  Created on: May 4, 2010
 *      Author: tflanzer
 */

#ifndef SERVO_H_
#define SERVO_H_

#include<math.h>

class Servo {

	int channel;
	double p1, p2, p3, p4; // Evaluated as p1*x^3+p2*x^2+p3*x+p4
	double maxDeflection;


public:
	Servo(double a1, double a2, double a3, double a4, double max);
	virtual ~Servo();

    double actuateRad(double angle);
    void percentThrottle(double throttle);
};

#endif /* SERVO_H_ */
